package com.soap.call;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class check_network {

	
	
	

	private static boolean isNetwokAvailable;
	/**
	 * check wheather network available or not either wi-fi of mobile network
	 * @param ctx
	 * @return
	 */
	public static boolean isNetworkAvailable(Context ctx)
	    {
		return true;
//		 ConnectivityManager  connectionManager = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);
//		 NetworkInfo   wifiInfo = connectionManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
//		 NetworkInfo   mobileInfo = connectionManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
//		    
//		 	   if(wifiInfo.isConnected() || mobileInfo.isConnected()) { 
//		 		   isNetwokAvailable = true;
//			       }
//			       else {
//			    	   isNetwokAvailable = false;
//			       }
//		 	   
//		 	 /* if (connectionManager.getActiveNetworkInfo() == null){
//               //no network is available
//		 		 isNetwokAvailable= false;
//       } else {
//               //at least one type of network is available
//     	  isNetwokAvailable= true;
//       }*/
//		 	   return  isNetwokAvailable;
	    }

}
